import request from '@/utils/request'

// 查询预约信息列表
export function listAppointment(query) {
	return request({
		url: '/project/wtc/appointment/list',
		method: 'get',
		params: query
	})
}

// 查询预约信息详细
export function getAppointment(id) {
	return request({
		url: '/project/wtc/appointment/' + id,
		method: 'get'
	})
}

// 新增预约信息
export function addAppointment(data) {
	return request({
		url: '/project/wtc/appointment',
		method: 'post',
		data: data
	})
}

// 修改预约信息
export function updateAppointment(data) {
	return request({
		url: '/project/wtc/appointment',
		method: 'put',
		data: data
	})
}

// 删除预约信息
export function delAppointment(id) {
	return request({
		url: '/project/wtc/appointment/' + id,
		method: 'delete'
	})
}

//  获取用户权限信息
export function getRoleId() {
	return request({
		url: '/project/wtc/appointment/roleId',
		method: 'get'
	})
}

//  发送企业微信消息
export function sendMessage(id) {
	return request({
		url: '/project/wtc/appointment/message/' + id,
		method: 'get'
	})
}

// 获取审核对象的身份
export function getRole(studentId) {
	return request({
		url: '/system/user/role/' + studentId,
		method: 'get',
		params: studentId
	})
}
